<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <h1>Test-Del</h1>
    <h2>已删除sw.js</h2>
    <div id="msg"></div>
    <script>
      (function() {
        if (window.addEventListener) {
          window.addEventListener("load", function() {
            var script = document.createElement("script");

            script.onerror = function(e) {
              document.querySelector("#msg").innerHTML = JSON.stringify(e);
            };
            script.src = "./regSW.pwa.js?t=" + Date.now();
            script.async = true;
            script.type = "text/javascript";
            script.crossOrigin = "anonymous";

            document.head.insertBefore(script, document.head.firstChild);
          });
        }
      })();
    </script>
  </body>
</html>
